// EcoModeler - C# Edition :: Version 9.16 build 3301
using System;
using System.ComponentModel;
using System.Collections;
using System.Collections.Generic;
using Eco.Services;
using Eco.ObjectRepresentation;
using Eco.ObjectImplementation;
using Eco.UmlRt;
using Eco.UmlCodeAttributes;
using Eco.Subscription;

namespace TTServer
{
	#region MM_ECO_Generated
	#region Attributes
	[UmlElement(Id="{4c20690a-6d30-434e-85d0-6731fd3ca85a}")]
	#endregion

	#region Documentation
	//1 Medien-Dokument
	/// Medien-Dokument
	#endregion

	#endregion
	public class Dokument: TTServerObject
	{
		#region MM_ECO AutoGenerated ECO code

		new public struct Eco_LoopbackIndices
		{
			public const int Eco_FirstMember = TTServer.TTServerObject.Eco_LoopbackIndices.Eco_MemberCount;
			public const int Eco_MemberCount = (Eco_FirstMember + 2);
			public const int Name_MemberIndex = Eco_FirstMember + 0;
			public const int ZugehoerigesObjekt_MemberIndex = Eco_FirstMember + 1;
		}
		#endregion

		#region MM_ECO Model owned attributes
		//Note: Do not remove any property within this region, nor change its signature

		#region MM_ECO_Generated
		[UmlElement("AssociationEnd", Index=(Dokument.Eco_LoopbackIndices.ZugehoerigesObjekt_MemberIndex), Id="{4dfd6b80-1fe6-4e64-ac2d-3c1cc4d47c47}")]
		[UmlMetaAttribute("association", typeof(TTServerPackage.TTServerObjectDokument), Index=0)]
		[UmlMetaAttribute("multiplicity", "0..1")]
		[UmlTaggedValue("Eco.Embed", "True")]
		#endregion
		public TTServer.TTServerObject ZugehoerigesObjekt
		{
			get
			{
				#region MM_ECO_Generated
				return (TTServer.TTServerObject) (this.eco_Content.get_MemberByIndex(Eco_LoopbackIndices.ZugehoerigesObjekt_MemberIndex));
				#endregion
			}
			set
			{
				#region MM_ECO_Generated
				this.eco_Content.set_MemberByIndex(Eco_LoopbackIndices.ZugehoerigesObjekt_MemberIndex, ((object)(value)));
				#endregion
			}
		}

		#region MM_ECO_Generated
		#region Attributes
		[UmlElement(Index=(Dokument.Eco_LoopbackIndices.Name_MemberIndex), Id="{ec9fdccd-34da-41ef-968c-aa8b362f863a}")]
		[UmlMetaAttribute("initialValue", "<NULL>")]
		[UmlTaggedValue("Eco.Length", "255")]
		#endregion

		#region Documentation
		//1 Name des Dokuments
		/// Name des Dokuments
		#endregion

		#endregion
		public string Name
		{
			get
			{
				#region MM_ECO_Generated
				return (string) (this.eco_Content.get_MemberByIndex(Eco_LoopbackIndices.Name_MemberIndex));
				#endregion
			}
			set
			{
				#region MM_ECO_Generated
				this.eco_Content.set_MemberByIndex(Eco_LoopbackIndices.Name_MemberIndex, ((object)(value)));
				#endregion
			}
		}
		#endregion

		#region MM_ECO Model owned methods
		//Note: Do not remove any method within this region, nor change its signature

		public Dokument(IContent content) : base(content)
		{
			#region MM_ECO_Generated
			#endregion
		}

		public Dokument(IEcoServiceProvider serviceProvider) : base(serviceProvider)
		{
			try
			{
				// Place user code ONLY here
			}
			catch (System.Exception)
			{
				this.Deinitialize(serviceProvider);
				throw;
			}
		}
		#endregion
	}
}
